namespace Verse;

public class LanguageWorker_Danish : LanguageWorker
{
	public override string WithIndefiniteArticle(string str, Gender gender, bool plural = false, bool name = false)
	{
		if (str.NullOrEmpty())
		{
			return str;
		}
		if (name)
		{
			return str;
		}
		if (gender == Gender.Male || gender == Gender.Female)
		{
			return "en " + str;
		}
		return "et " + str;
	}

	public override string WithDefiniteArticle(string str, Gender gender, bool plural = false, bool name = false)
	{
		if (str.NullOrEmpty())
		{
			return str;
		}
		if (name)
		{
			return str;
		}
		char c = str[str.Length - 1];
		if (gender == Gender.Male || gender == Gender.Female)
		{
			if (c == 'e')
			{
				return str + "n";
			}
			return str + "en";
		}
		if (c == 'e')
		{
			return str + "t";
		}
		return str + "et";
	}
}
